package com.xyj.controller;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.redis.core.StringRedisTemplate;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @classDescription:
 * @author:xiayingjie
 * @createTime:16/8/7
 */
@RestController
public class TestController {
   // @Autowired
    StringRedisTemplate stringRedisTemplate;
    @RequestMapping(value = "test")
    public String hello() throws Exception {
        stringRedisTemplate.opsForValue().set("aa","11");
        System.out.println(stringRedisTemplate.opsForValue().get("aa"));
        return "hello world";
    }
}
